#include <fstream>
#include <iostream>

class Component
{
        std::string _name;
        Component* _parent;
    protected:
        Component();
        ~Component();
        virtual void SetName(std::string name);
};

class XmlFile
{
        std::fstream _actFile;
        Component* _content;
    public:
        XmlFile(const std::string filename);
        ~XmlFile();
        bool Add();
        bool Modify();
        bool Delete();
        void Save();
};

class Element : public Component
{
        std::string _name;
        Element* _parent;
        Component* _subElem;
    public:
        Element();
        ~Element();
        bool Modify();
};

class Attribute : public Component
{
        std::string _name,_value;
        Element* _parent;
    public:
        Attribute();
        ~Attribute();
        bool Modify();
};

